<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <title>无标题文档</title>
    <link rel="shortcut icon" th:href="@{/img/favicon.ico}"/>
    <link rel="bookmark" th:href="@{/img/favicon.ico}" type="image/x-icon"/>
    <link th:href="@{/css/style.css}" rel="stylesheet" type="text/css"/>
    <script type="text/javascript" th:src="@{/js/jquery.js}"></script>
</head>

<body>
<div class="place"><span>位置：</span>
    <ul class="placeul">
        <li><a th:href="@{/sys/users/userall}">系统管理</a></li>
        <li><a th:href="@{/sys/area/areaList}">区域管理</a></li>
    </ul>
</div>
<div class="rightinfo">
    <form th:action="@{/sys/area/areaList}" method="post" id="areaFrom">
        <input type="hidden" name="pageno" value="1" id="pageno"/>
        <ul class="tools">
            <li> 省:
                <input type="text" name="pname" th:value="${pname}"/>
            </li>
            <li> 市:
                <input type="text" name="cname" th:value="${cname}"/>
            </li>
            <li class="subBut" onclick="goPage(1)"><img src="../../images/t06.png"/>查询</li>
            <li class="subBut" onclick="reset()"><img th:src="@{/images/t03.png}"/>重置</li>
        </ul>
        <table class="tablelist">
            <thead>
            <tr>
                <th>序号</th>
                <th>省编号</th>
                <th>省名称</th>
                <th>市编号</th>
                <th>市名称</th>
            </tr>
            </thead>
            <tbody>
            <tr th:each="area,var :${proCity.list}">
                <td th:text="${(proCity.pageNum-1)*proCity.pageSize+var.count}"></td>
                <td th:text="${area.pNumber}">130000</td>
                <td th:text="${area.pName}">河北省</td>
                <td th:text="${area.cNumber}">130200</td>
                <td th:text="${area.cName}">唐山市</td>
            </tr>
            </tbody>
        </table>
        <div class="pagin">
            <div class="message">共<i class="blue" th:text="${proCity.total}"></i>条记录，当前显示第&nbsp;<i class="blue"
                                                                                                   th:text="${proCity.pageNum}">2&nbsp;</i>页
            </div>
            <ul class="paginList">
                <li class="paginItem">
                    <a href="javascript:void(0);" th:onclick="goPage([[${proCity.isFirstPage?1:proCity.pageNum-1}]])">
                        <span th:class="${proCity.isFirstPage?'pagepre':'pagenxt roate'}"></span>
                    </a>
                </li>
                <li th:class="${page==proCity.pageNum?'paginItem current':'paginItem'}"
                    th:each="page : ${proCity.navigatepageNums}">
                    <a href="javascript:;" th:text="${page}" th:onclick="goPage([[${page}]])">1</a>
                </li>
                <li class="paginItem">
                    <a href="javascript:void(0);"
                       th:onclick="goPage([[${proCity.isLastPage?proCity.pages:proCity.pageNum+1}]])">
                        <span th:class="${proCity.isLastPage?'pagepre roate':'pagenxt'}"></span>
                    </a>
                </li>
            </ul>
        </div>
    </form>
</div>
<script type="text/javascript">
    $('.tablelist tbody tr:odd').addClass('odd');

    //表单提交
    function goPage(num) {
        $("#pageno").val(num);
        $("#areaFrom").submit();
    }

    //重置
    function reset() {
        $("input[name=pname]").val("");
        $("input[name=cname]").val("");
    }
</script>
</body>
</html>
